<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

    <head>
        <meta charset="utf-8" />
        <title>日程添加</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta content="Premium Multipurpose Admin & Dashboard Template" name="description" />
        <meta content="" name="author" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />

        <!-- App favicon -->
        <link rel="shortcut icon" href="../assets/images/favicon.ico" th:href="@{/assets/images/favicon.ico}">

        <!-- App css -->
        <link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" th:href="@{/assets/css/bootstrap.min.css}" />
        <link href="../assets/css/jquery-ui.min.css" rel="stylesheet" th:href="@{/assets/css/jquery-ui.min.css}">
        <link href="../assets/css/icons.min.css" rel="stylesheet" type="text/css" th:href="@{/assets/css/icons.min.css}" />
        <link href="../assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" th:href="@{/assets/css/metisMenu.min.css}"/>
        <link href="../assets/css/app.min.css" rel="stylesheet" type="text/css" th:href="@{/assets/css/app.min.css}"/>

    </head>

    <body>

         <!-- Top Bar Start -->
         <div th:replace="~{common/top-nav::top-nav}"></div>
         <!-- Top Bar End -->


         <!-- Left Sidenav -->
         <div th:replace="~{common/left-side-nav::left-side-nav}"></div>
        <!-- end left-sidenav-->

        <div class="page-wrapper">
            <!-- Page Content-->
            <div class="page-content">

                <div class="container-fluid">
                    <!-- Page-Title -->
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="page-title-box">
                                <div class="float-right">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="javascript:void(0);">办公自动化</a></li>
                                        <li class="breadcrumb-item"><a href="javascript:void(0);">日程安排</a></li>
                                        <li class="breadcrumb-item active">日程添加</li>
                                    </ol>
                                </div>
                                <h4 class="page-title">添加日程</h4>
                            </div><!--end page-title-box-->
                        </div><!--end col-->
                    </div>
                    <!-- end page title end breadcrumb -->
                    <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-body">

                                    <div class="col-lg-12">
                                        <div class="card">
                                            <div class="card-body">
                                                <h2 class="mt-0 header-title">添加日程</h2>
                                                <form th:action="@{/schedule/schedule_add}" method="post">
                                                    <div class="form-group">
                                                        <label for="name">所属用户</label>
                                                            <select class="form-control" name="userId">
                                                                <option selected> 请选择用户......</option>
                                                                <option th:each="us : ${users}"
                                                                        th:selected="${schedule != null ? schedule.userId == us.id : false}"
                                                                        th:value="${us.id}"
                                                                        th:text="${us.name}" id="name"></option>
                                                            </select>
                                                    </div>

                                                    <div class="form-group col-sm-6 float-left">
                                                        <label for="startTime">开始时间</label>
                                                            <input class="form-control" type="datetime-local"
                                                                   th:value="${schedule != null ? schedule.startTime : ''}"
                                                                   id="startTime" name="startTime" placeholder="请选择开始时间">
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="startTime" name="startTime"-->
<!--                                                               th:value="${schedule != null ? schedule.startTime : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请输入昵称">-->
                                                    </div>


                                                    <div class="form-group col-sm-6 float-left" >
                                                        <label for="endTime">结束时间</label>
                                                        <input class="form-control" type="datetime-local"
                                                               th:value="${schedule != null ? schedule.endTime : ''}"
                                                               id="endTime" name="endTime" placeholder="请选择结束时间">
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="endTime" name="endTime"-->
<!--                                                               th:value="${schedule != null ? schedule.endTime : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请输入昵称">-->
                                                    </div>


                                                    <div class="form-group col-sm-6 float-left">
                                                        <label for="remindDatetime">提醒时间</label>
                                                        <input class="form-control" type="datetime-local"
                                                               th:value="${schedule != null ? schedule.remindDatetime : ''}"
                                                               id="remindDatetime" name="remindDatetime" placeholder="请选择提醒时间">
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="remindDatetime" name="remindDatetime"-->
<!--                                                               th:value="${schedule != null ? schedule.remindDatetime : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请输入昵称">-->
                                                    </div>

                                                    <div class="form-group row">
                                                        <label for="remindNumber">提醒次数</label>
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="remindNumber" name="remindNumber"-->
<!--                                                               th:value="${schedule != null ? schedule.remindNumber : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请选择提醒次数">-->
                                                        <select class="form-control" id="remindNumber" name="remindNumber"
                                                                th:value="${schedule != null ? schedule.remindNumber : ''}">
                                                            <option selected >请选择提醒次数...</option>
                                                            <option>1</option>
                                                            <option>2</option>
                                                            <option>3</option>
                                                            <option>4</option>
                                                        </select>
                                                    </div>
                                                    <div class="float-none"> </div>
                                                    <div class="form-group">
                                                        <label for="title">日程标题</label>
                                                        <input type="text" class="form-control"
                                                               id="title" name="title"
                                                               th:value="${schedule != null ? schedule.title : ''}"
                                                               aria-describedby="emailHelp" placeholder="请输入日程标题">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="content">日程内容</label>
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="content" name="content"-->
<!--                                                               th:value="${schedule != null ? schedule.content : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请输入日程内容">-->
                                                        <textarea class="form-control" rows="5"
                                                                  id="content" name="content"
                                                                  th:value="${schedule != null ? schedule.content : ''}" placeholder="请输入日程内容"></textarea>
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="level">优先级别</label>
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="level" name="level"-->
<!--                                                               th:value="${schedule != null ? schedule.level : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请选择优先级">-->
                                                        <select class="form-control" id="level" name="level"
                                                                th:value="${schedule != null ? schedule.level : ''}">
                                                            <option selected >请选择优先级别...</option>
                                                            <option>普通</option>
                                                            <option>重要</option>
                                                        </select>
                                                    </div>

                                                    <div class="form-group">
                                                        <label for="remark">备注</label>
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="remark" name="remark"-->
<!--                                                               th:value="${schedule != null ? schedule.remark : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请备注">-->
                                                        <textarea class="form-control" rows="5"
                                                                  id="remark" name="remark"
                                                                  th:value="${schedule != null ? schedule.remark : ''}" placeholder="请输入备注信息"></textarea>
                                                    </div>


                                                    <div class="form-group">
                                                        <label for="status">状态</label>
<!--                                                        <input type="text" class="form-control"-->
<!--                                                               id="status" name="status"-->
<!--                                                               th:value="${schedule != null ? schedule.status : ''}"-->
<!--                                                               aria-describedby="emailHelp" placeholder="请选择状态">-->
                                                        <select class="form-control" id="status" name="status"
                                                                th:value="${schedule != null ? schedule.status : ''}">
                                                            <option selected >请选择状态</option>
                                                            <option>未开始</option>
                                                            <option>进行中</option>
                                                            <option>已结束</option>
                                                        </select>

                                                    </div>

                                                    <button type="submit"
                                                            class="btn btn-gradient-primary">提交</button>
                                                    <button type="reset"
                                                            class="btn btn-gradient-danger">重置</button>
                                                </form>
                                            </div><!--end card-body-->
                                        </div><!--end card-->
                                    </div>

                                    <!--end table-->
                                </div><!--end card-body-->
                            </div><!--end card-->
                        </div> <!-- end col -->
                    </div> <!-- end row -->

                    <!-- end row -->

                </div><!-- container -->

                <footer class="footer text-center text-sm-left">
                    &copy; 2022办公自动化 <span class="text-muted d-none d-sm-inline-block float-right"><i class="mdi mdi-heart text-danger"></i> 来自 <a href="#">4228</a></span>
                </footer><!--end footer-->
            </div>
            <!-- end page content -->
        </div>
        <!-- end page-wrapper -->




        <!-- jQuery  -->
        <script src="../assets/js/jquery.min.js" th:src="@{/assets/js/jquery.min.js}"></script>
        <script src="../assets/js/jquery-ui.min.js" th:src="@{/assets/js/jquery-ui.min.js}"></script>
        <script src="../assets/js/bootstrap.bundle.min.js" th:src="@{/assets/js/bootstrap.bundle.min.js}"></script>
        <script src="../assets/js/metismenu.min.js" th:src="@{/assets/js/metismenu.min.js}"></script>
        <script src="../assets/js/waves.js" th:src="@{/assets/js/waves.js}"></script>
        <script src="../assets/js/feather.min.js" th:src="@{/assets/js/feather.min.js}"></script>
        <script src="../assets/js/jquery.slimscroll.min.js" th:src="@{/assets/js/jquery.slimscroll.min.js}"></script>

        <script src="../../plugins/tiny-editable/mindmup-editabletable.js" th:src="@{/../plugins/tiny-editable/mindmup-editabletable.js}"></script>
        <script src="../../plugins/tiny-editable/numeric-input-example.js" th:src="@{/../plugins/tiny-editable/numeric-input-example.js}"></script>
        <script src="../../plugins/bootable/bootstable.js" th:src="@{/../plugins/bootable/bootstable.js}"></script>
        <script src="../assets/pages/jquery.tabledit.init.js" th:src="@{/assets/pages/jquery.tabledit.init.js}"></script>

        <!-- App js -->
        <script src="../assets/js/app.js" th:src="@{/assets/js/app.js}"></script>

         <script>
             // 为表单注册提交事件
             $('form.needs-validation').submit(function (enevt) {
                 // 调用表单对象的验证方法。如果验证方法返回true，说明表单所有的域都填写正确。否则返回false
                 if (this.checkValidity() === false){
                     // 为表单添加注册失败后的样式
                     $(this).addClass('was-validated')
                     return false;
                 }

                 return true;
             })
         </script>
        
    </body>

</html>